package com.muniuliuma.screen;

import com.muniuliuma.R;
import com.muniuliuma.basecontrol.BaseActivity;
import com.muniuliuma.basecontrol.MenuControl;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class MainActivity extends BaseActivity {
	private TextView mTextView;
	private Button mButton;
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
		findViews();
		setListeners();
		
    	initialize();
    }
    
    @Override
    protected void onResume() {
    	super.onResume();
    }

	private void findViews() {
		mTextView = (TextView) findViewById(R.id.TestTextView);
		mButton = (Button) findViewById(R.id.Button01);
		
	}
	
	private void initialize(){
		mTextView.setText("Screen width is "+MenuControl.getWidthOfScreen());
	}

	private void setListeners() {
		mButton.setOnClickListener(new OnClickListener(){

			@Override
			public void onClick(View v) {
				startActivity(MenuActivity.class);
				
			}});
		
	}
}